import requests from '@/utils/request'

const BASE_URL = 'http://localhost:8090'

export default {
    // 查询所有数据
    getAllData() {
        return requests({
            url: '/json/datas.json',
            method: 'get'
        })
    },
    // 分页查询
    getDataByPage(page,limit){
        return requests({
            url: `/page/${page}/${limit}`,
            method: 'get'
        })
    },
    // 条件分页查询
    getDataByPageWithCondition(page,limit,title,time){
        return requests({
            url: `/where/${page}/${limit}?title=${title}&time=${time}`,
            method: 'get'
        })
    },
	
	// 分页查询
	getExpertByPage(page,limit){
	    return requests({
	        url: `/expertsPage/${page}/${limit}`,
	        method: 'get'
	    })
	},
	// 根据id查询专家信息
	getExpertById(id){
	    return requests({
	        url: `/expertsById/${id}`,
	        method: 'get'
	    })
	},
}
